{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 莫尔斯电码的编解码"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 从网页拷贝得到的原始数据："
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<pre>A\t·-\tB\t-···\tC\t-·-·\tD\t-··\tE\t·\tF\t··-·\tG\t--·\n",
    "H\t····\tI\t··\tJ\t·---\tK\t-·-\tL\t·-··\tM\t--\tN\t-·\n",
    "O\t---\tP\t·--·\tQ\t--·-\tR\t·-·\tS\t···\tT\t-\tU\t··-\n",
    "V\t···-\tW\t·--\tX\t-··-\tY\t-·--\tZ\t--··\t\t\t\t</pre>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 利用Excel进行规整，再拷贝过来："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "src_text = \"\"\"A\t·-\n",
    "H\t····\n",
    "O\t---\n",
    "V\t···-\n",
    "B\t-···\n",
    "I\t··\n",
    "P\t·--·\n",
    "W\t·--\n",
    "C\t-·-·\n",
    "J\t·---\n",
    "Q\t--·-\n",
    "X\t-··-\n",
    "D\t-··\n",
    "K\t-·-\n",
    "R\t·-·\n",
    "Y\t-·--\n",
    "D\t-··\n",
    "K\t-·-\n",
    "R\t·-·\n",
    "Y\t-·--\n",
    "E\t·\n",
    "L\t·-··\n",
    "S\t···\n",
    "Z\t--··\n",
    "F\t··-·\n",
    "M\t--\n",
    "T\t-\n",
    "G\t--·\n",
    "N\t-·\n",
    "U\t··-\"\"\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 用不带参数的split()在所有不可见字符处切分"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "moorse_table_dict = dict()\n",
    "items = src_text.split()\n",
    "for i in range(int(len(items)/2)):\n",
    "    moorse_table_dict[items[2 * i]] = items[2 * i + 1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'A': '·-',\n",
       " 'H': '····',\n",
       " 'O': '---',\n",
       " 'V': '···-',\n",
       " 'B': '-···',\n",
       " 'I': '··',\n",
       " 'P': '·--·',\n",
       " 'W': '·--',\n",
       " 'C': '-·-·',\n",
       " 'J': '·---',\n",
       " 'Q': '--·-',\n",
       " 'X': '-··-',\n",
       " 'D': '-··',\n",
       " 'K': '-·-',\n",
       " 'R': '·-·',\n",
       " 'Y': '-·--',\n",
       " 'E': '·',\n",
       " 'L': '·-··',\n",
       " 'S': '···',\n",
       " 'Z': '--··',\n",
       " 'F': '··-·',\n",
       " 'M': '--',\n",
       " 'T': '-',\n",
       " 'G': '--·',\n",
       " 'N': '-·',\n",
       " 'U': '··-'}"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "moorse_table_dict"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 用带参数的split()在特定字符处切分"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "moorse_table_dict_ = dict()\n",
    "for line in src_text.split('\\n'):\n",
    "    k, v = line.split('\\t')\n",
    "    moorse_table_dict_[k] = v"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'A': '·-',\n",
       " 'H': '····',\n",
       " 'O': '---',\n",
       " 'V': '···-',\n",
       " 'B': '-···',\n",
       " 'I': '··',\n",
       " 'P': '·--·',\n",
       " 'W': '·--',\n",
       " 'C': '-·-·',\n",
       " 'J': '·---',\n",
       " 'Q': '--·-',\n",
       " 'X': '-··-',\n",
       " 'D': '-··',\n",
       " 'K': '-·-',\n",
       " 'R': '·-·',\n",
       " 'Y': '-·--',\n",
       " 'E': '·',\n",
       " 'L': '·-··',\n",
       " 'S': '···',\n",
       " 'Z': '--··',\n",
       " 'F': '··-·',\n",
       " 'M': '--',\n",
       " 'T': '-',\n",
       " 'G': '--·',\n",
       " 'N': '-·',\n",
       " 'U': '··-'}"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "moorse_table_dict_"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### CSV文件的读取"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "﻿A,·-,,,,,,,,,,\n",
      "H,····,,,,,,,,,,\n",
      "O,---,,,,,,,,,,\n",
      "V,···-,,,,,,,,,,\n",
      "B,-···,,,,,,,,,,\n",
      "I,··,,,,,,,,,,\n",
      "P,·--·,,,,,,,,,,\n",
      "W,·--,,,,,,,,,,\n",
      "C,-·-·,,,,,,,,,,\n",
      "J,·---,,,,,,,,,,\n",
      "Q,--·-,,,,,,,,,,\n",
      "X,-··-,,,,,,,,,,\n",
      "D,-··,,,,,,,,,,\n",
      "K,-·-,,,,,,,,,,\n",
      "R,·-·,,,,,,,,,,\n",
      "Y,-·--,,,,,,,,,,\n",
      "E,·,,,,,,,,,,\n",
      "L,·-··,,,,,,,,,,\n",
      "S,···,,,,,,,,,,\n",
      "Z,--··,,,,,,,,,,\n",
      "F,··-·,,,,,,,,,,\n",
      "M,--,,,,,,,,,,\n",
      "T,-,,,,,,,,,,\n",
      "G,--·,,,,,,,,,,\n",
      "N,-·,,,,,,,,,,\n",
      "U,··-,,,,,,,,,,"
     ]
    }
   ],
   "source": [
    "!cat moorse.csv"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "import csv"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['\\ufeffA', '·-', '', '', '', '', '', '', '', '', '', '']\n",
      "A ·-\n",
      "['H', '····', '', '', '', '', '', '', '', '', '', '']\n",
      "H ····\n",
      "['O', '---', '', '', '', '', '', '', '', '', '', '']\n",
      "O ---\n",
      "['V', '···-', '', '', '', '', '', '', '', '', '', '']\n",
      "V ···-\n",
      "['B', '-···', '', '', '', '', '', '', '', '', '', '']\n",
      "B -···\n",
      "['I', '··', '', '', '', '', '', '', '', '', '', '']\n",
      "I ··\n",
      "['P', '·--·', '', '', '', '', '', '', '', '', '', '']\n",
      "P ·--·\n",
      "['W', '·--', '', '', '', '', '', '', '', '', '', '']\n",
      "W ·--\n",
      "['C', '-·-·', '', '', '', '', '', '', '', '', '', '']\n",
      "C -·-·\n",
      "['J', '·---', '', '', '', '', '', '', '', '', '', '']\n",
      "J ·---\n",
      "['Q', '--·-', '', '', '', '', '', '', '', '', '', '']\n",
      "Q --·-\n",
      "['X', '-··-', '', '', '', '', '', '', '', '', '', '']\n",
      "X -··-\n",
      "['D', '-··', '', '', '', '', '', '', '', '', '', '']\n",
      "D -··\n",
      "['K', '-·-', '', '', '', '', '', '', '', '', '', '']\n",
      "K -·-\n",
      "['R', '·-·', '', '', '', '', '', '', '', '', '', '']\n",
      "R ·-·\n",
      "['Y', '-·--', '', '', '', '', '', '', '', '', '', '']\n",
      "Y -·--\n",
      "['E', '·', '', '', '', '', '', '', '', '', '', '']\n",
      "E ·\n",
      "['L', '·-··', '', '', '', '', '', '', '', '', '', '']\n",
      "L ·-··\n",
      "['S', '···', '', '', '', '', '', '', '', '', '', '']\n",
      "S ···\n",
      "['Z', '--··', '', '', '', '', '', '', '', '', '', '']\n",
      "Z --··\n",
      "['F', '··-·', '', '', '', '', '', '', '', '', '', '']\n",
      "F ··-·\n",
      "['M', '--', '', '', '', '', '', '', '', '', '', '']\n",
      "M --\n",
      "['T', '-', '', '', '', '', '', '', '', '', '', '']\n",
      "T -\n",
      "['G', '--·', '', '', '', '', '', '', '', '', '', '']\n",
      "G --·\n",
      "['N', '-·', '', '', '', '', '', '', '', '', '', '']\n",
      "N -·\n",
      "['U', '··-', '', '', '', '', '', '', '', '', '', '']\n",
      "U ··-\n"
     ]
    }
   ],
   "source": [
    "moorse_dict = dict()\n",
    "with open('moorse.csv', 'r') as f:\n",
    "    csv_reader = csv.reader(f)\n",
    "    for row in csv_reader:\n",
    "        print(row)\n",
    "        print(row[0][-1], row[1])\n",
    "        moorse_dict[row[0][-1]] = row[1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'A': '·-', 'H': '····', 'O': '---', 'V': '···-', 'B': '-···', 'I': '··', 'P': '·--·', 'W': '·--', 'C': '-·-·', 'J': '·---', 'Q': '--·-', 'X': '-··-', 'D': '-··', 'K': '-·-', 'R': '·-·', 'Y': '-·--', 'E': '·', 'L': '·-··', 'S': '···', 'Z': '--··', 'F': '··-·', 'M': '--', 'T': '-', 'G': '--·', 'N': '-·', 'U': '··-'}\n"
     ]
    }
   ],
   "source": [
    "print(moorse_dict)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 用文本编辑器的正则查找、替换规整数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "moorse_dict = {\n",
    "    'A': '·-',\n",
    "    'B': '-···',\n",
    "    'C': '-·-·',\n",
    "    'D': '-··',\n",
    "    'E': '·',\n",
    "    'F': '··-·',\n",
    "    'G': '--·',\n",
    "    'H': '····',\n",
    "    'I': '··',\n",
    "    'J': '·---',\n",
    "    'K': '-·-',\n",
    "    'L': '·-··',\n",
    "    'M': '--',\n",
    "    'N': '-·',\n",
    "    'O': '---',\n",
    "    'P': '·--·',\n",
    "    'Q': '--·-',\n",
    "    'R': '·-·',\n",
    "    'S': '···',\n",
    "    'T': '-',\n",
    "    'U': '··-',\n",
    "    'V': '···-',\n",
    "    'W': '·--',\n",
    "    'X': '-··-',\n",
    "    'Y': '-·--',\n",
    "    'Z': '--··',\n",
    "    '1': '·----',\n",
    "    '2': '··---',\n",
    "    '3': '···--',\n",
    "    '4': '····-',\n",
    "    '5': '·····',\n",
    "    '6': '-····',\n",
    "    '7': '--···',\n",
    "    '8': '---··',\n",
    "    '9': '----·',\n",
    "    '0': '-----',\n",
    "    '.': '·-·-·-',\n",
    "    ':': '---···',\n",
    "    ',': '--··--',\n",
    "    ';': '-·-·-·',\n",
    "    '?': '··--··',\n",
    "    '=': '-···-',\n",
    "    '\\'': '·----·',\n",
    "    '/': '-··-·',\n",
    "    '!': '-·-·--',\n",
    "    '-': '-····-',\n",
    "    '_': '··--·-',\n",
    "    '\"': '·-··-·',\n",
    "    '(': '-·--·',\n",
    "    ')': '-·--·-',\n",
    "    '$': '···-··-',\n",
    "    '&': '·-···',\n",
    "    '@': '·--·-·',\n",
    "    '+': '·-·-·',\n",
    "}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'A': '·-',\n",
       " 'B': '-···',\n",
       " 'C': '-·-·',\n",
       " 'D': '-··',\n",
       " 'E': '·',\n",
       " 'F': '··-·',\n",
       " 'G': '--·',\n",
       " 'H': '····',\n",
       " 'I': '··',\n",
       " 'J': '·---',\n",
       " 'K': '-·-',\n",
       " 'L': '·-··',\n",
       " 'M': '--',\n",
       " 'N': '-·',\n",
       " 'O': '---',\n",
       " 'P': '·--·',\n",
       " 'Q': '--·-',\n",
       " 'R': '·-·',\n",
       " 'S': '···',\n",
       " 'T': '-',\n",
       " 'U': '··-',\n",
       " 'V': '···-',\n",
       " 'W': '·--',\n",
       " 'X': '-··-',\n",
       " 'Y': '-·--',\n",
       " 'Z': '--··',\n",
       " '1': '·----',\n",
       " '2': '··---',\n",
       " '3': '···--',\n",
       " '4': '····-',\n",
       " '5': '·····',\n",
       " '6': '-····',\n",
       " '7': '--···',\n",
       " '8': '---··',\n",
       " '9': '----·',\n",
       " '0': '-----',\n",
       " '.': '·-·-·-',\n",
       " ':': '---···',\n",
       " ',': '--··--',\n",
       " ';': '-·-·-·',\n",
       " '?': '··--··',\n",
       " '=': '-···-',\n",
       " \"'\": '·----·',\n",
       " '/': '-··-·',\n",
       " '!': '-·-·--',\n",
       " '-': '-····-',\n",
       " '_': '··--·-',\n",
       " '\"': '·-··-·',\n",
       " '(': '-·--·',\n",
       " ')': '-·--·-',\n",
       " '$': '···-··-',\n",
       " '&': '·-···',\n",
       " '@': '·--·-·',\n",
       " '+': '·-·-·'}"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "moorse_dict"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [],
   "source": [
    "moorse_dict = {\n",
    "    'A': '·-',\t\n",
    "    'B': '-···',\t\n",
    "    'C': '-·-·',\t\n",
    "    'D': '-··',\t\n",
    "    'E': '·',\t\n",
    "    'F': '··-·',\t\n",
    "    'G': '--·',\n",
    "    'H': '····',\t\n",
    "    'I': '··',\t\n",
    "    'J': '·---',\t\n",
    "    'K': '-·-',\t\n",
    "    'L': '·-··',\t\n",
    "    'M': '--',\t\n",
    "    'N': '-·',\n",
    "    'O': '---',\t\n",
    "    'P': '·--·',\t\n",
    "    'Q': '--·-',\t\n",
    "    'R': '·-·',\t\n",
    "    'S': '···',\t\n",
    "    'T': '-',\t\n",
    "    'U': '··-',\n",
    "    'V': '···-',\t\n",
    "    'W': '·--',\t\n",
    "    'X': '-··-',\t\n",
    "    'Y': '-·--',\t\n",
    "    'Z': '--··',\t\t\t\t\n",
    "    '1': '·----',\n",
    "    '2': '··---',\n",
    "    '3': '···--',\t\n",
    "    '4': '····-',\t\n",
    "    '5': '·····',\n",
    "    '6': '-····',\t\n",
    "    '7': '--···',\t\n",
    "    '8': '---··',\n",
    "    '9': '----·',\n",
    "    '0': '-----',\n",
    "    '.': '·-·-·-',\t\n",
    "    ':': '---···',\t\n",
    "    ',': '--··--',\t\n",
    "    ';': '-·-·-·',\t\n",
    "    '?': '··--··',\t\n",
    "    '=': '-···-',\n",
    "    '\\'': '·----·',\t\n",
    "    '/': '-··-·',\t\n",
    "    '!': '-·-·--',\t\n",
    "    '-': '-····-',\t\n",
    "    '_': '··--·-',\t\n",
    "    '\"': '·-··-·',\n",
    "    '(': '-·--·',\t\n",
    "    ')': '-·--·-',\t\n",
    "    '$': '···-··-',\t\n",
    "    '&': '·-···',\t\n",
    "    '@': '·--·-·',\t\n",
    "    '+': '·-·-·',\n",
    "}"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 用代码进行正则表达式数据抽取"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [],
   "source": [
    "src_text = \"\"\"基础拉丁字母\n",
    "字符\t代码\t字符\t代码\t字符\t代码\t字符\t代码\t字符\t代码\t字符\t代码\t字符\t代码\n",
    "A\t·-\tB\t-···\tC\t-·-·\tD\t-··\tE\t·\tF\t··-·\tG\t--·\n",
    "H\t····\tI\t··\tJ\t·---\tK\t-·-\tL\t·-··\tM\t--\tN\t-·\n",
    "O\t---\tP\t·--·\tQ\t--·-\tR\t·-·\tS\t···\tT\t-\tU\t··-\n",
    "V\t···-\tW\t·--\tX\t-··-\tY\t-·--\tZ\t--··\t\t\t\t\n",
    "数字\n",
    "摩尔斯电码的数字有长码和短码，通常用长码，于中文电码中组成汉字则使用短码。\n",
    "\n",
    "字符\t长码\t短码\t字符\t长码\t短码\t字符\t长码\t短码\t字符\t长码\t短码\t字符\t长码\t短码\n",
    "1\t·----\t·-\t2\t··---\t··-\t3\t···--\t···-\t4\t····-\t····-\t5\t·····\t·····\n",
    "6\t-····\t-····\t7\t--···\t-···\t8\t---··\t-··\t9\t----·\t-·\t0\t-----\t-\n",
    "标点符号\n",
    "字符\t代码\t字符\t代码\t字符\t代码\t字符\t代码\t字符\t代码\t字符\t代码\n",
    ".\t·-·-·-\t:\t---···\t,\t--··--\t;\t-·-·-·\t?\t··--··\t=\t-···-\n",
    "'\t·----·\t/\t-··-·\t!\t-·-·--\t-\t-····-\t_\t··--·-\t\"\t·-··-·\n",
    "(\t-·--·\t)\t-·--·-\t$\t···-··-\t&\t·-···\t@\t·--·-·\t+\t·-·-·\n",
    "\"\"\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "import re"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [],
   "source": [
    "moorse_sict_reverse = dict()\n",
    "for k, v in re.findall('(.)\\t([-·]+)', src_text):\n",
    "#     print(k, v)\n",
    "    moorse_dict[k] = v\n",
    "    moorse_sict_reverse[v] = k"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'A': '·-',\n",
       " 'B': '-···',\n",
       " 'C': '-·-·',\n",
       " 'D': '-··',\n",
       " 'E': '·',\n",
       " 'F': '··-·',\n",
       " 'G': '--·',\n",
       " 'H': '····',\n",
       " 'I': '··',\n",
       " 'J': '·---',\n",
       " 'K': '-·-',\n",
       " 'L': '·-··',\n",
       " 'M': '--',\n",
       " 'N': '-·',\n",
       " 'O': '---',\n",
       " 'P': '·--·',\n",
       " 'Q': '--·-',\n",
       " 'R': '·-·',\n",
       " 'S': '···',\n",
       " 'T': '-',\n",
       " 'U': '··-',\n",
       " 'V': '···-',\n",
       " 'W': '·--',\n",
       " 'X': '-··-',\n",
       " 'Y': '-·--',\n",
       " 'Z': '--··',\n",
       " '1': '·----',\n",
       " '2': '··---',\n",
       " '3': '···--',\n",
       " '4': '····-',\n",
       " '5': '·····',\n",
       " '6': '-····',\n",
       " '7': '--···',\n",
       " '8': '---··',\n",
       " '9': '----·',\n",
       " '0': '-----',\n",
       " '.': '·-·-·-',\n",
       " ':': '---···',\n",
       " ',': '--··--',\n",
       " ';': '-·-·-·',\n",
       " '?': '··--··',\n",
       " '=': '-···-',\n",
       " \"'\": '·----·',\n",
       " '/': '-··-·',\n",
       " '!': '-·-·--',\n",
       " '-': '-····-',\n",
       " '_': '··--·-',\n",
       " '\"': '·-··-·',\n",
       " '(': '-·--·',\n",
       " ')': '-·--·-',\n",
       " '$': '···-··-',\n",
       " '&': '·-···',\n",
       " '@': '·--·-·',\n",
       " '+': '·-·-·'}"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "moorse_dict"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'·-': 'A',\n",
       " '-···': 'B',\n",
       " '-·-·': 'C',\n",
       " '-··': 'D',\n",
       " '·': 'E',\n",
       " '··-·': 'F',\n",
       " '--·': 'G',\n",
       " '····': 'H',\n",
       " '··': 'I',\n",
       " '·---': 'J',\n",
       " '-·-': 'K',\n",
       " '·-··': 'L',\n",
       " '--': 'M',\n",
       " '-·': 'N',\n",
       " '---': 'O',\n",
       " '·--·': 'P',\n",
       " '--·-': 'Q',\n",
       " '·-·': 'R',\n",
       " '···': 'S',\n",
       " '-': 'T',\n",
       " '··-': 'U',\n",
       " '···-': 'V',\n",
       " '·--': 'W',\n",
       " '-··-': 'X',\n",
       " '-·--': 'Y',\n",
       " '--··': 'Z',\n",
       " '·----': '1',\n",
       " '··---': '2',\n",
       " '···--': '3',\n",
       " '····-': '4',\n",
       " '·····': '5',\n",
       " '-····': '6',\n",
       " '--···': '7',\n",
       " '---··': '8',\n",
       " '----·': '9',\n",
       " '-----': '0',\n",
       " '·-·-·-': '.',\n",
       " '---···': ':',\n",
       " '--··--': ',',\n",
       " '-·-·-·': ';',\n",
       " '··--··': '?',\n",
       " '-···-': '=',\n",
       " '·----·': \"'\",\n",
       " '-··-·': '/',\n",
       " '-·-·--': '!',\n",
       " '-····-': '-',\n",
       " '··--·-': '_',\n",
       " '·-··-·': '\"',\n",
       " '-·--·': '(',\n",
       " '-·--·-': ')',\n",
       " '···-··-': '$',\n",
       " '·-···': '&',\n",
       " '·--·-·': '@',\n",
       " '·-·-·': '+'}"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "moorse_sict_reverse"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
